Repository navigation
Conversation
The name given to generated objects was read by a block copied in 20 places that walked the stack with traceback.walk_stack(None). Since Python 3.12 it starts four frames up instead of two, so in a plain script it walks past the end of the stack and pytta.generate.sweep() raises AttributeError at module level and UnboundLocalError inside a function. One helper, _instanceinfo.caller_name, replaces the copies: it walks from the caller explicitly and returns an empty name when the source line is not available (python -c). Tests run real scripts in a subprocess, since under pytest the stack is deep enough to hide the failure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
scipy.signal.hann and scipy.signal.tukey were removed in SciPy 1.13. The five calls now use scipy.signal.windows, the same functions with the same defaults. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 31, 2026
[FIX] window the impulse response before filtering for C80, D50 and support (ISO 3382-1, A.3.4)
#127
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Python 3.12 with a current SciPy,
x = pytta.generate.sweep()in a plain script fails, both at module level and inside a function:Two causes, one commit each:
creation_name) was read by a block copied in 20 places (generate, therunmethods of the measurements,rooms,iso3741,apps/roomir). It walks the stack withtraceback.walk_stack(None), which since Python 3.12 starts four frames up instead of two; in a shallow script it walks past the end of the stack. The 20 copies are replaced by one helper,_instanceinfo.caller_name(), which walks from the caller explicitly and returns an empty name when the source line is not available (python -c). Behaviour is otherwise the same: the text before=on the module-level line of the calling script.scipy.signal.hannandscipy.signal.tukeywere removed in SciPy 1.13; the 5 calls now usescipy.signal.windows, the same functions with the same defaults.Tests (
tests/test_creation_name.py, 2 tests) run real scripts in a subprocess, since under pytest the stack is deep enough to hide the first failure: a script gets the module-level name, also when the generator is called inside a function, andpython -cworks with an empty name.The fix also clears 4 of the 7 failures that
developmenthas: the 3 intests/test_h5io.pyandtest_pyttasave_impulsiveresponseintests/test_pyttasave.py. The 3 left, all intests/test_pyttasave.py(ChannelsListinitialization,int64in JSON), are unrelated.Checked with Python 3.12, numpy 1.26, scipy 1.17.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com